Stygian.map = Stygian.map or {}

function mk_create_map()
	WindowWidth, WindowHeight = getMainWindowSize()
	createMiniConsole( "mk_map", 0, 0, 0, 0 )
	setBackgroundColor( "mk_map", 0, 0, 0, 0 )
	setMiniConsoleFontSize( "mk_map", gui_map_font )
	local x, y = calcFontSize( gui_map_font )
  Stygian.map.height = y * 25
  Stygian.map.width = x * 45
	resizeWindow( "mk_map", x*45, y*25 )
	global_map_height = y*25
	moveWindow( "mk_map", WindowWidth-x*45, 0 )
end

function mk_map_resize()
	local WindowWidth, WindowHeight = getMainWindowSize()
	setMiniConsoleFontSize( "mk_map", gui_map_font)
	local x, y = calcFontSize( gui_map_font )
	resizeWindow( "mk_map", x*45, y*25 )
  Stygian.map.height = y * 25
  Stygian.map.width = x * 45
	moveWindow( "mk_map", WindowWidth-x*45, 0 ) 
end

function mk_cut_n_paste()
	selectCurrentLine()
	copy()
	appendBuffer("mk_map")
	deleteLine()
end

